package ua.maxicash.service;

import ua.maxicash.dto.WorkRowJson;
import ua.maxicash.dto.WorkerOnWorkRowJson;
import ua.maxicash.dto.WorkerRowJson;
import ua.maxicash.util.JqgridQuery;
import ua.maxicash.vo.SystemUser;
import ua.maxicash.vo.Work;
import ua.maxicash.vo.Worker;
import ua.maxicash.vo.WorkingDay;

import java.util.Set;

public interface AppService {

    public SystemUser getSystemUserByEmail(String email);
    public SystemUser getSystemUserById(Long id);
    public Set<Work> getAllWorks();
    public Set<Work> getActiveWorks();
    public void subscribeWorker(String emailWorker, Long idWork);
    public WorkRowJson convertWorkingDayToJsonDto(WorkingDay workingDay); 
    public WorkerRowJson convertWorkerToRowJson(Worker worker); 
    public WorkerOnWorkRowJson convertWorkerOnWorkToRowJson(Worker worker);
    public JqgridQuery parseFilters(String query);
    public Set<Work> getWorksByJqgridQuery(JqgridQuery jq);
    public Set<Worker> getWorkersByJqgridQuery(JqgridQuery jq);
    public Set<Worker> getAllWorkers();
    public Set<SystemUser> getLikes(Long idUser, Integer amount);
    public Set<SystemUser> getAllLikes(String userEmail);
    public Set<SystemUser> getAllLikes(Long idUser);
    public void like(String myEmail, String hisEmail);
    public void saveSystemUser(SystemUser su);
    public boolean isSubscribed(Worker su, Work work);
    public void unsubscribeWorker(String emailWorker, long idWork);
    public void removeFromLikes(Long idUser, Long idLike);
}
